﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace POS {
    public partial class SetupController : Form {
        public int ControllerId { get; set; }
        public SetupController() {
            InitializeComponent();
        }

        private void OkClick(object sender, EventArgs e) {
            int value = 0;
            if (int.TryParse(textBox1.Text, out value)) {
                ControllerId = value;
                this.DialogResult = DialogResult.OK;
                this.Close();
            } else {
                MessageBox.Show("Please insert a valid number!");
            }
        }

        private void button2_Click(object sender, EventArgs e) {
            this.DialogResult = DialogResult.Cancel;
            this.Close();
        }
    }
}
